import request from '@/utils/request';

/**
 * @Function: login
 * @Description: 登录
 * @Author: YUKKING
 * @Version: 1.0
 */
export function login(username, password, imgKey, imgCode) {
  return request({
    url: '/signin',
    method: 'post',
    data: {
      username,
      password,
      imgKey,
      imgCode
    }
  })
}

/**
 * @Function: logout
 * @Description: 注销登录
 * @Author: YUKKING
 * @Version: 1.0
 */
export function logout() {
  return request({
    url: '/signout',
    method: 'post',
    data: {}
  })
}

/**
 * @Function: getInfo
 * @Description: 获取用户基本信息
 * @Author: YUKKING
 * @Version: 1.0
 */
export function getInfo() {
  return request({
    url: '/basic',
    method: 'post',
    data: {}
  })
}

/**
 * @Function: getMent
 * @Description: 获取侧栏菜单
 * @Author: YUKKING
 * @Version: 1.0
 */
export function getMenu() {
  return request({
    url: '/config/menu',
    method: 'post',
    data: {}
  })
}
